<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/">
    <xi:include href="master.html" />

<?python
    from mnemoply.common_knowledge import month_captions
    from mnemoply.utils import format_currency
?>

<head />

<body>
    <div align="center">
        <span>Payment confirmation for </span>
        <span>${month_captions[month]}</span>
        <span>${year}</span>:
        <span>amount will be changed</span>
    </div>

    <table class="maintable">
        <thead>
        <tr>
            <th rowspan="2" align="center">Student</th>
            <th rowspan="2" align="center">Group</th>
            <th colspan="4" align="center">Old state</th>
            <th colspan="4" align="center">New state</th>
        </tr>
        <tr>
            <th>Hours</th>
            <th>Tariff</th>
            <th>Discont</th>
            <th>Amount</th>
            <th>Hours</th>
            <th>Tariff</th>
            <th>Discont</th>
            <th>Amount</th>
        </tr>
        </thead>

        <tbody>
            <tr py:for="obj in recharge_list">
                <td>
                    <a href="/Student/${obj.student.id}/">${obj.student.title}</a>
                </td>

                <td><a href="/Group/${obj.group.id}/">${obj.group.title}</a></td>

                <td>${format_currency(obj.old_hours)}</td>
                <td>${format_currency(obj.old_tariff)}</td>
                <td><span py:if="obj.old_discont">${obj.old_discont.title}</span></td>
                <td>${format_currency(obj.old_amount)}</td>

                <td>${format_currency(obj.new_hours)}</td>
                <td>${format_currency(obj.new_tariff)}</td>
                <td><span py:if="obj.new_discont">${obj.new_discont.title}</span></td>
                <td>${format_currency(obj.new_amount)}</td>
            </tr>
        </tbody>
    </table>

    <div align="center">
        <form action="${action}" method="POST">
            <input type="hidden" name="ids" value="${ids}" />
            <input type="hidden" name="month" value="${month}" />
            <input type="hidden" name="year" value="${year}" />
            <input type="hidden" name="can_recharge" value="1" />

            <input type="submit" value="${_('Confirm')}" />
        </form>

        <br />

        <span>${ET(tg.back_widget())}</span>
    </div>
</body>
</html>
